"use strict";

var _marked = /*#__PURE__*/regeneratorRuntime.mark(fn),
    _marked2 = /*#__PURE__*/regeneratorRuntime.mark(fn2);

/**
 * [description]
 * @returns {[type]} [description]
 */

function fn() {
    var a, b;
    return regeneratorRuntime.wrap(function fn$(_context) {
        while (1) {
            switch (_context.prev = _context.next) {
                case 0:
                    _context.next = 2;
                    return 1;

                case 2:
                    a = _context.sent;

                    console.log(a);
                    _context.next = 6;
                    return 2;

                case 6:
                    b = _context.sent;

                    console.log(b);
                    _context.next = 10;
                    return 3;

                case 10:
                    a = _context.sent;

                    console.log(a);
                    return _context.abrupt("return", b);

                case 13:
                case "end":
                    return _context.stop();
            }
        }
    }, _marked, this);
}

function fn2() {
    var aa;
    return regeneratorRuntime.wrap(function fn2$(_context2) {
        while (1) {
            switch (_context2.prev = _context2.next) {
                case 0:
                    return _context2.delegateYield(fn1(), "t0", 1);

                case 1:
                    aa = _context2.t0;
                    return _context2.abrupt("return", aa);

                case 3:
                case "end":
                    return _context2.stop();
            }
        }
    }, _marked2, this);
}

var gen = fn();

var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;

try {
    for (var _iterator = gen[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
        var v = _step.value;

        console.log(v);
    }
} catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
} finally {
    try {
        if (!_iteratorNormalCompletion && _iterator.return) {
            _iterator.return();
        }
    } finally {
        if (_didIteratorError) {
            throw _iteratorError;
        }
    }
}

var gen2 = fn();

console.log(gen2.next(8));
console.log(gen2.next(9));
console.log(gen2.next(10));
console.log(gen2.next(11));
console.log(gen2.next(12));

